/*
Copyright (C) 2003 Michael Würtinger

This file is part of Dynamicengine.

Dynamicengine is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.

Dynamicengine is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Dynamicengine. If not, see http://www.gnu.org/licenses/.
*/


#include "include.h"
#include "material.h"

CMaterial::CMaterial(float _D, float _max_pressure, float _max_pull, float _mass)
{
	D = _D;
	max_pressure = _max_pressure;
	max_pull = _max_pull;
	mass = _mass;
}

CMaterial::~CMaterial()
{
}

float CMaterial::GetD(float l)
{
	if(l < 0.1)
		l = 0.1;

	return D;// / l;
}

float CMaterial::GetMaxPressure()
{
	return max_pressure;
}

float CMaterial::GetMaxPull()
{
	return max_pull;
}

float CMaterial::GetMass(float l)
{
	return mass * l;
}


				  //500000  //10000	//7000
//CMaterial mat_steel(500000, 10000, 7000, 2);
CMaterial mat_steel(500000, 100000, 20000, 10);
